package top.timous.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.timous.entity.BigType;
import top.timous.entity.R;
import top.timous.service.IBigTypeService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Timous
 * @create 2022-02-27 17:03
 **/
@RestController
@RequestMapping("/bigType")
public class BigTypeController {

    @Autowired
    private IBigTypeService iBigTypeService;

    /*
    * 查询所有商品大类
    * */
    @GetMapping("/findAll")
    public R finaAll(){
        List<BigType> bigTypeList = iBigTypeService.list();
        Map<String , Object> map = new HashMap<>();
        map.put("message" , bigTypeList);
        return R.ok(map);
    }




}
